package com.zc.zby.basicframedemo.activity;

import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;

import com.jude.easyrecyclerview.EasyRecyclerView;
import com.zc.zby.basicframedemo.R;
import com.zc.zby.basicframedemo.adapter.FrescoAdapter;
import com.zc.zby.basicframedemo.base.BaseActivity;
import com.zc.zby.basicframedemo.data.DataUtils;

import java.util.ArrayList;

import butterknife.BindView;

public class FrescoActivity extends BaseActivity {

    @BindView(R.id.easyRecyclerView)
    protected EasyRecyclerView easyRecyclerView;
    private FrescoAdapter frescoAdapter;
    private ArrayList<String> mList;

    @Override
    public int getLayoutId() {
        return R.layout.activity_fresco;
    }

    @Override
    public void initViews(Bundle savedInstanceState) {
        mList = new ArrayList<>();
        easyRecyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext()));
        easyRecyclerView.setAdapter(frescoAdapter = new FrescoAdapter(getApplicationContext()));
        for (int i = 0; i < 20; i++) {
            mList.add(DataUtils.url);
        }
        frescoAdapter.addAll(mList);
    }

    @Override
    public void initToolBar() {
        getToolbarTitle().setText("Fresco");
    }

    @Override
    public void setListeners() {

    }

    @Override
    public void initData() {

    }
}
